#include "planet_math.h"
/**************
     PlanetMath
 **************/
PlanetMath::PlanetMath(void) : rad(-1.0), color(0)
{
}

PlanetMath::PlanetMath(double xCoordinate, double yCoordinate, double zCoordinate, double xVelocity, double yVelocity, double zVelocity, double mass, QString _name)
   : rad(-1.0)
   , color(0)
{
  r = Point3D(xCoordinate, yCoordinate, zCoordinate);
  v = Point3D(xVelocity, yVelocity, zVelocity);
  bondV = Point3D(0, 0, 0);
  m = mass;
  path << r;
  vels << v;
  isConnected = -1;
  name = _name;
}
PlanetMath::PlanetMath(Point3D position, Point3D velocity, double mass) : rad(-1.0), color(0)
{
  r = Point3D(position.x, position.y, position.z);
  v = Point3D(velocity.x, velocity.y, velocity.z);
  bondV = Point3D(0, 0, 0);
  m = mass;
  path << r;
  vels << v;
  isConnected = -1;
}

PlanetMath::PlanetMath( PlanetMath &src, bool flag )
{
  r = src.r;
  v = src.v;
  m = src.m;
  bondV = src.bondV;
  if (flag == 1)
  {
    path = QVector<Point3D>(src.path);
    vels = QVector<Point3D>(src.vels);
  }
  isConnected = src.isConnected;
}


